package com.kun.gulimall.coupon.controller;

import com.kun.gulimall.coupon.service.CouponService;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@AllArgsConstructor
@RequestMapping("/coupon/coupon")
@RestController
public class CouponController {

    private final CouponService couponService;

    /**
     * 列表
     */
    @GetMapping("/list")
    public ResponseEntity<Object> list(Map<String, Object> params) {
        return ResponseEntity.ok(couponService.queryPage(params));
    }

}
